Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Describe the change. If there is an associated issue, please include the issue link (e.g. "Closes #xxx"). For UI changes, please also include screenshots.
This cleans up and deduplicates the code used to generate action menus, and also opens the door for components to provide a dynamic number of actions. It will also make it easier to bind shortcuts to actions.
This also includes a medium-sized refactor of emitters. The Emitter trait has had most of its logic moved to the EmitterHandle struct. Accordingly, the Emitter trait is now called ToEmitter, and EmitterHandle is now just Emitter. This should cut down a bit on static code duplication during compilation, and also simplifies the emitter logic a bit. Components themselves are no longer emitters, instead they just hold emitters. Since components are no longer working directly with Emitter IDs, it's not possible to mix up IDs and emit the wrong type from one. An emitter is just an emitter ID bound to a particular type.
Known Risks
What issues could potentially go wrong with this change? Is it a breaking change? What have you done to mitigate any potential risks?
Big code change = big bug potential. Mitigated with good existing unit tests.
QA
How did you test this?
Leaning on existing tests here
Checklist
CONTRIBUTING.md
already?CHANGELOG.md
?